@extends('layout.admin')

@section('content')
<!-- 放置一个html表单 -->
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>用户添加</span>
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" action="/user/insert" method="post" enctype="multipart/form-data">
    		 @if (count($errors) > 0)
                <div class="mws-form-message warning">
                    @foreach ($errors->all() as $error)
                    {{$error}}<br>
                    @endforeach
                </div>
             @endif
            <div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">用户名</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="username" value="{{old('username')}}">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">密码</label>
    				<div class="mws-form-item">
    					<input class="small" type="password" name="password">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">确认密码</label>
    				<div class="mws-form-item">
    					<input class="small" type="password" name="repassword">
    				</div>
    			</div>

    			<div class="mws-form-row">
    				<label class="mws-form-label">邮箱</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="email"value="{{old('email')}}">
    				</div>
    			</div>
                
    			<div class="mws-form-row">
                    <label class="mws-form-label">头像</label>
                    <div class="mws-form-item" style="width:450px">
                        <input  class="small" type="file" name="profile" value="{{old('porfile')}}">
                    </div>
                </div>

    			<div class="mws-form-row">
    				<label class="mws-form-label">性别</label>
    				<div class="mws-form-item clearfix">
    					<ul class="mws-form-list inline">
    						<li><input type="radio" name="sex" value="1" value="{{old('radio')}}"> <label>男</label></li>
    						<li><input type="radio" name="sex" value="0" value="{{old('radio')}}"> <label>女</label></li>
    					</ul>
    				</div>
    			</div>
    		</div>
    		<div class="mws-button-row">
            <!-- 隐藏 防止检测错误 -->
    			{{csrf_field()}}
    			<input value="添加" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
@endsection